<!DOCTYPE html>
<html>
<head>
    <include file="./public/sty.html"/>
    <style>
        .c-pages {
            padding: 20px 0;
            text-align: center;
        }

        .c-pages.tl {
            text-align: left;
        }

        .c-pages span {
            display: inline-block;
            margin-right: 5px;
            font-size: 12px;
            height: 28px;
            line-height: 28px;
        }

        .c-pages span.col {
            color: #fe344e;
            font-weight: 600;
        }

        .c-pages span a {
            display: inline-block;
            margin: 0 3px;
            height: 28px;
            line-height: 28px;
            text-align: center;
            padding: 0 12px;
            border: 1px solid #ccc;
            text-decoration: none;
            border-radius: 2px;
        }

        .c-pages span a:link, .c-pages span a:active, .c-pages span a:visited {
            color: #333;
        }

        .c-pages span a:hover {
            color: #ff8540;
        }

        .c-pages span a.active {
            color: #fff;
            background: #ff8540;
        }

        .c-pages .current {
            color: #fff;
            background: #ff8540;
            display: inline-block;
            margin: 0 3px;
            height: 28px;
            line-height: 28px;
            text-align: center;
            padding: 0 12px;
            text-decoration: none;
            border-radius: 2px;
        }
        .NumLink{display: none!important;}
        .on{display: inline-block!important;}
    </style>
</head>
<body>
<div id="app" class="securityCenter">
    <include file="./public/header.html"/>

    <div class="container containerUser fix pt15" s="[object Object]">
        <div class="slideUser">
            <ul class="sildeSession"><h3><span></span>账号管理</h3>
                <li class=""><a href="./personalInfo.html">个人信息</a></li>
                <li class="curr"><a href="./securityCenter.html">安全中心</a></li>
                <li class=""><a href="./manageBankcard.html">银行卡管理</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>投注管理</h3>
                <li><a href="./BetRecord.html" class="">投注记录</a></li>
                <li><a href="./seekOrder.html" class="">追号记录</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>资金管理</h3>
                <li><a href="./BillRecord.html" class="">交易记录</a></li>
                <li class=""><a href="./PLstatement.html">今日盈亏</a></li>
            </ul>
            <ul class="sildeSession">
                <h3><span></span>代理中心</h3>
                <li><a href="{:U('Users/agentIntro')}" class="">代理说明</a></li>
                <li class=""><a href="{:U('Users/agentReport')}">代理报表</a></li>
                <li><a href="{:U('Users/lowerReport')}" class="">下级报表</a></li>
                <li class=""><a href="{:U('Users/manageInvite')}">下级开户</a></li>
                <li><a href="{:U('Users/agentMember')}" class="">会员管理</a></li>
                <li><a href="{:U('Users/agentBetRecord')}" class="">投注明细</a></li>
                <li><a href="{:U('Users/agentBillRecord')}" class="">交易明细</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>消息管理</h3>
                <li><a href="./letter.html" class="">站内信</a></li>
                <li><a href="./Notice.html" class="">网站公告</a></li>
            </ul>
        </div>


        <div data-v-581fc0de="" class="userRight">
            <div data-v-581fc0de="" class="userTitle mgb10">投注明细</div>
            <div data-v-581fc0de="" class="userMain mgb10">
                <form class="well form-search" method="post" action="{:U('Users/agentBetRecord')}">
                    <ul data-v-581fc0de="" class="todayView mgb10" style="text-align: left;"><em
                            data-v-581fc0de="">账号：</em>
                        <input data-v-581fc0de="" type="text" placeholder="下级投注查询" class="userInput" value="{$zhanghao}">&nbsp;
                        <a data-v-581fc0de="" class="submitBtn" onclick="sousuo()">搜索</a>
                        &nbsp; <a data-v-839ca216="" class="submitBtn" href="{:U('Users/agentBetRecord')}" style="background-color: red">清空</a>
                    </ul>

                <ul data-v-be5f85f8="" class="searchFirst" data-v-581fc0de="">
                    <li data-v-be5f85f8=""><span data-v-be5f85f8="">彩种：</span>
                        <ins data-v-be5f85f8="" class="selectIcon">
                            <div data-v-be5f85f8="" class="title"><span class="fx_c_name">全部彩票</span>
                                <select name="caizhong" id="caizhong" onchange="xuanze2()" data-v-be5f85f8=""
                                        class="userSelect">
                                    <option value="">全部彩票</option>
                                    <foreach name="classs " item="v">
                                        <option value="{$v.id}"
                                        <?php if($caizhong==$v["id"]){echo "selected";};?>>{$v.name}</option>
                                    </foreach>
                                </select>
                            </div>
                            <em data-v-be5f85f8=""></em>
                        </ins>
                    </li>
                    <li data-v-be5f85f8="" class="_time">
                  <span data-v-be5f85f8="">时间：
                            <a data-v-be5f85f8="" class="userSearch times <?php if($shijian=='1'){echo 'active';}; ?> "
                               data-value="1" onclick="xuanze(this.id)" id="jintian" name="jintian">今天</a>
                            <a data-v-be5f85f8="" class="userSearch times <?php if($shijian=='2'){echo 'active';}; ?>"
                               data-value="2" onclick="xuanze(this.id)" id="zuotian" name="zuotian">昨天</a>
                            <a data-v-be5f85f8="" class="userSearch times <?php if($shijian=='3'){echo 'active';}; ?>"
                               data-value="3" onclick="xuanze(this.id)" id="qitian" name="qitian">七天</a>
                        </span>
                    </li>
                    <li data-v-be5f85f8="" class="_state">
                    <span data-v-be5f85f8="">类型：
                            <a data-v-be5f85f8="" class="userSearch lx <?php if($leixing=='0'){echo 'active';}; ?> "
                               data-id="0" onclick="xuanze3(this.id)" id="quan">全部</a>
                            <a data-v-be5f85f8="" class="userSearch lx <?php if($leixing=='1'){echo 'active';}; ?> "
                               data-id="1" onclick="xuanze3(this.id)" id="yi">已中奖</a>
                            <a data-v-be5f85f8="" class="userSearch lx <?php if($leixing=='2'){echo 'active';}; ?> "
                               data-id="2" onclick="xuanze3(this.id)" id="wei">未中奖</a>
                            <a data-v-be5f85f8="" class="userSearch lx <?php if($leixing=='3'){echo 'active';}; ?> "
                               data-id="3" onclick="xuanze3(this.id)" id="deng">等待开奖</a>
                        </span>
                    </li>
                </ul>
                </form>
                <div data-v-581fc0de="" class="searchDetail">
                    <table data-v-581fc0de="">
                        <tbody data-v-581fc0de="">
                        <tr data-v-581fc0de="">
                            <th data-v-581fc0de="">账号</th>
                            <th data-v-581fc0de="" colspan="1">彩种</th>
                            <th data-v-581fc0de="">期号</th>
                            <th data-v-581fc0de="">投注内容</th>
                            <th data-v-581fc0de="">投注金额</th>
                            <th data-v-581fc0de="">开奖号码</th>
                            <th data-v-581fc0de="">奖金状态</th>
                            <th data-v-581fc0de="">投注时间</th>
                            <th data-v-581fc0de="">操作项</th>
                        </tr>
                        </tbody>

                        <?php if(!empty($arr)){?>
                        <tbody class="Records_listCont">
                        <foreach name="arr" item="v">
                            <tr>
                                <td>{$v.accounts}</td>
                                <td style="color: rgb(74, 169, 219);">{$v.classname}</td>
                                <td>{$v.issue}</td>
                                <td>
                                    <div style="width: 50px" class="betNum" data-qzhu="<?php if($v['table']=='1'){echo $a1[$v['id']];}
                                    elseif($v['table']=='2'){echo $a2[$v['id']];}
                                    elseif($v['table']=='3'){echo $a3[$v['id']];}
                                    elseif($v['table']=='4'){echo $a4[$v['id']];}
                                    elseif($v['table']=='5'){echo $a5[$v['id']];}
                                    elseif($v['table']=='6'){echo $a6[$v['id']];}
                                    ;?>">
                                        <?php if($v["table"]=='1'){echo $a1[$v['id']];}
                                        elseif($v["table"]=='2'){echo $a2[$v['id']];}
                                        elseif($v["table"]=='3'){echo $a3[$v['id']];}
                                        elseif($v["table"]=='4'){echo $a4[$v['id']];}
                                        elseif($v["table"]=='5'){echo $a5[$v['id']];}
                                        elseif($v["table"]=='6'){echo $a6[$v['id']];}
                                        ;?>
                                    </div>
                                    <a class="NumLink" style="color: rgb(74, 169, 187);display: none">[详情]</a>
                                </td>
                                <td><?php echo sprintf('%.2f',$v['money']); ?></td>
                                <td >
                                    <div class="betNum" data-qzhu="{$v.opencode}">
                                        <?php if(trim($v['opencode'])==""){echo "----";}else{echo $v['opencode'];} ?>
                                    </div>
                                    <a class="NumLink1" style="color: rgb(74, 169, 187);display: none">[详情]</a>
                                </td>
                                <td>
                                    <?php if(trim($v["opencode"])==''){echo "等待开奖";}
                                              elseif($v['zong_money'] > 0 && $v['opencode']!=''){echo "<font color='red'>".sprintf('%.2f',$v['zong_money'])."</font>";}
                                              elseif($v['zong_money'] == 0 && $v['opencode']!=''){echo '未中奖';} ;?>
                                </td>

                                <td><?php echo date("Y-m-d H:i:s",$v["ctime"]);?></td>
                                <td>
                                    <a href="{:U('Users/betDetail',array('lotteryclass'=>$v['lotteryclass'],'table'=>$v['table'],'id'=>$v['id']))}">查看</a>
                                </td>
                            </tr>
                        </foreach>
                        </tbody>
                        <?php }else{ ?>
                        <div class="Records_listCont" id="t2">
                            <tr style="border-bottom-width: 0px;">
                                <td colspan="100">
                                    <div class="notContent" style="padding: 100px 0px;"><i class="iconfont"></i>暂无记录
                                    </div>
                                </td>
                            </tr>
                        </div>
                        <?php }?>
                    </table>
                </div>
                <!--分页-->
                <div class="c-pages tc">
                    <span>{$page}第{$p}页/共{$totalpage}页</span>
                </div>

                <div class="userTip mgt15"><p><i></i>温馨提示：投注记录最多只保留7天。
                </p></div>
            </div>
        </div>


    </div>
    <include file="./public/footer.html"/>
</div>
<!--弹出框-->
<div id="layermbox7" class="layermbox layermbox0 layermshow" index="7">
    <div class="laymshade"></div>
    <div class="layermmain">
        <div class="section">
            <div class="layermchild  layermanim"><h3 style="">投注内容</h3>
                <button class="layermend"></button>
                <div class="layermcont"></div>
                <div class="layermbtn"><span type="1">关闭</span></div>
            </div>
        </div>
    </div>
</div>
<!--弹出框 end-->
<!--验证账号弹出框 begion-->
<div id="layermbox2" class="layermbox layermbox0 layermshow" index="1">
    <div class="laymshade"></div>
    <div class="layermmain">
        <div class="section">
            <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                <button class="layermend"></button>
                <div class="layermcont">·您搜索的会员账号不存在·</div>
                <div class="layermbtn"><span type="1">确定</span></div>
            </div>
        </div>
    </div>
</div>
<!--验证账号弹出框 end-->

<script src="/style/js/jquery.min.js"></script>
<script src="/style/js/fx.js"></script>
<script>
    function trim(str){ //删除左右两端的空格
        return str.replace(/(^\s*)|(\s*$)/g, "");
    }
    $(function () {
        personalInfo();
        $(".userSearch").click(function () {
            $(this).addClass("active").siblings(".userSearch").removeClass("active");
        });

        $(".betNum").each(function(){
            var str = $(this).text();

            if(str.length>175){
                $(this).siblings(".NumLink").addClass("on");
            }
            if(str.length>120){
                $(this).siblings(".NumLink1").addClass("on");
            }
        });
        $(".NumLink").click(function(){
            var txt = $(this).prev().data("qzhu");
            $("#layermbox7 .layermcont").text(txt);
            $("#layermbox7").show();
        });
        $(".NumLink1").click(function(){
            var txt = $(this).prev().data("qzhu");
            $("#layermbox7 .layermcont").text(txt);
            $("#layermbox7").show();
        });

        var txt = $(this).find("option:selected").text();
        $(".fx_c_name").text(txt);
        $(".userSelect").change(function () {
            var val = $(this).val();
            var txt = $(this).find("option:selected").text();
            $(".fx_c_name").text(txt);
        })
    })
    function sousuo() {
        var zhang = $(".userInput").val();
        var zhanghao = zhang.replace(/\s/g,"");
        if(zhanghao==''){
             return false;
        }
        $.ajax({
            type: "POST",
            url: "{:U('Users/zhanghao')}",
            data: {'zhanghao': zhanghao},
            success: function (dat) {
                if (dat == 0) {
                  $("#layermbox2").show();
                }else {
                    window.location.href = "/Users/agentBetRecord/zhanghao/" + zhanghao;
                }
            }
        });
    }



    //时间的 传值
    function xuanze(a) {
        var zhanghao = $(".userInput").val();
        var lotteryclass = $("#caizhong").val();
        var shijian = $("#" + a).attr("data-value");
        var leixing = $(".userSearch.lx.active").attr("data-id");

        window.location.href = "/Users/agentBetRecord/lotteryclass/" + lotteryclass + "/shijian/" + shijian + "/leixing/" + leixing+ "/zhanghao/" + zhanghao;
    }
    //彩种的 传值
    function xuanze2() {
        var zhanghao = $(".userInput").val();
        var lotteryclass = $("#caizhong").val();
        var shijian = $(".userSearch.times.active").attr("data-value");
        var leixing = $(".userSearch.lx.active").attr("data-id");
        window.location.href = "/Users/agentBetRecord/lotteryclass/" + lotteryclass + "/shijian/" + shijian + "/leixing/" + leixing+ "/zhanghao/" + zhanghao;
    }
    function xuanze3(b) {
        var zhanghao = $(".userInput").val();
        var lotteryclass = $("#caizhong").val();
        var shijian = $(".userSearch.times.active").attr("data-value");
        var leixing = $("#" + b).attr("data-id");

        window.location.href = "/Users/agentBetRecord/lotteryclass/" + lotteryclass + "/shijian/" + shijian + "/leixing/" + leixing+ "/zhanghao/" + zhanghao;
    }

</script>
</body>
</html>